Add pcbComb: fixed straight→45°→straight comb routing for pin-line bundles#2567
Open
derekbreden wants to merge 1 commit into
Open
Add pcbComb: fixed straight→45°→straight comb routing for pin-line bundles#2567derekbreden wants to merge 1 commit into
derekbreden wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ndles A sibling to pcbStraightLine/pcbPath. A <trace pcbComb="rowToColumn"> (also columnToColumn | columnToRow | rowToRow) is drawn as a fixed manual route between two lines of pads: a perpendicular escape, one 45° diagonal, a perpendicular landing. computeCombWaypoints derives the two bend points from the pads' live global positions in the manual-trace phase, before autorouting — so N of them nest into an even comb and re-derive if a part moves. A comb whose fixed shape can't reach the target without backtracking is left for the autorouter. Reads the pcbComb enum from @tscircuit/props (companion PR). docs/pcb-comb/ shows the same 12-net row→column bundle three ways (illustration for the PR discussion, not a test).
derekbreden
added a commit
to derekbreden/core
that referenced
this pull request
Jul 4, 2026
The workbench branch carried this feature under its pre-PR name (pcbFan / computeFanWaypoints). The extracted PR names it pcbComb / computeCombWaypoints. Rename here so the board dogfoods the exact upstreamed API; the util is adopted from the PR verbatim (same algorithm, polished comments). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
derekbreden
added a commit
to derekbreden/homesodamachine
that referenced
this pull request
Jul 4, 2026
The board and forks carried this feature under its pre-PR name pcbFan; the extracted PRs name it pcbComb (tscircuit/core#2567, tscircuit/props#715). Rename the core+props forks to pcbComb — adopting the PRs' exact util and prop verbatim (same algorithm, only names/comments differ) — bump the override SHAs, and switch every pcba.tsx trace plus the docs to pcbComb. Pure rename: the rendered copper is byte-identical, so out/ is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
pcbComb, a<trace>prop in the same family as the existingpcbStraightLineandpcbPath— a fixed, manually-shaped route rather than an autorouted one. WherepcbStraightLinedraws a direct line,pcbCombdraws the other common hand-routed shape between two lines of pads: a perpendicular escape off the pad, one 45° diagonal, and a perpendicular landing. N of them nest into an even comb.The value is
<sourceLine>To<targetLine>:columnToColumn | rowToColumn | columnToRow | rowToRow(a COLUMN of pads escapes perpendicular in x, a ROW in y). The two bend points are derived from the pads' live global positions in the manual-trace phase, before autorouting — so the comb re-derives if a part moves, nothing frozen. A comb whose fixed shape can't reach its target without backtracking is left unrouted for the autorouter.Where it helps — and where we're unsure
We hit this on a denser real board and wanted to offer a distilled, deliberately contrived example rather than imply it's common. The same 12-net row→column bundle, routed three ways on the identical board:
pcbStraightLinepcbCombautorouter

pcbStraightLine

pcbComb

To be clear about what this isn't: the autorouter isn't wrong — it optimizes each net with no signal to keep a bundle uniform, and just gets erratic under congestion (a 10 mm change in the gap flips it between 0 and 14 vias). For a plain fan-out it ties
pcbComb; the corner turn is where a declared shape earns its keep. And we honestly don't know whether this case is common, whether we're doing something else that creates our need, or whether bundle-shaping is a direction tscircuit wants to own vs. leave to the autorouter. We're offering it, not arguing for it.The change
lib/utils/computeCombWaypoints.ts— pure geometry (the two bend points).Trace_doInitialPcbManualTraceRendermirroring the existingpcbStraightLinebranch, plus a matching skip inTrace_doInitialPcbTraceRender. No autorouter changes.docs/pcb-comb/is only the illustration above — happy to drop it.On the red CI: both the
type-checkandtestfailures here are only the props dependency —<trace pcbComb="…">isn't in the upstreamtracePropsyet (the type and the runtime zod schema), so type-check rejects the prop and the test's trace autoroutes instead of combing. Both clear once tscircuit/props#715 publishes; nothing else is failing (the other test shards are just fail-fast cancellations).